/*
 * Flowable CMMN REST API
 * # flowable / flowəb(ə)l /    - a compact and highly efficient workflow and Business Process Management (BPM) platform for developers, system admins and business users.  - a lightning fast, tried and tested BPMN 2 process engine written in Java. It is Apache 2.0 licensed open source, with a committed community.  - can run embedded in a Java application, or as a service on a server, a cluster, and in the cloud. It integrates perfectly with Spring. With a rich Java and REST API, it is the ideal engine for orchestrating human or system activities.
 *
 * OpenAPI spec version: v1
 *
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */


package com.ibm.risk.irmp.workflow.client.flowable.model;

import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.List;

/**
 * HistoricCaseInstanceQueryRequest
 */

public class HistoricCaseInstanceQueryRequest {
  @JsonProperty("start")
  private Integer start = null;

  @JsonProperty("size")
  private Integer size = null;

  @JsonProperty("sort")
  private String sort = null;

  @JsonProperty("order")
  private String order = null;

  @JsonProperty("caseInstanceId")
  private String caseInstanceId = null;

  @JsonProperty("caseInstanceIds")
  private List<String> caseInstanceIds = null;

  @JsonProperty("caseBusinessKey")
  private String caseBusinessKey = null;

  @JsonProperty("caseDefinitionId")
  private String caseDefinitionId = null;

  @JsonProperty("caseDefinitionKey")
  private String caseDefinitionKey = null;

  @JsonProperty("excludeSubprocesses")
  private Boolean excludeSubprocesses = null;

  @JsonProperty("finished")
  private Boolean finished = null;

  @JsonProperty("involvedUser")
  private String involvedUser = null;

  @JsonProperty("finishedAfter")
  private OffsetDateTime finishedAfter = null;

  @JsonProperty("finishedBefore")
  private OffsetDateTime finishedBefore = null;

  @JsonProperty("startedAfter")
  private OffsetDateTime startedAfter = null;

  @JsonProperty("startedBefore")
  private OffsetDateTime startedBefore = null;

  @JsonProperty("startedBy")
  private String startedBy = null;

  @JsonProperty("includeCaseVariables")
  private Boolean includeCaseVariables = null;

  @JsonProperty("variables")
  private List<QueryVariable> variables = null;

  @JsonProperty("tenantId")
  private String tenantId = null;

  @JsonProperty("withoutTenantId")
  private Boolean withoutTenantId = null;

  public HistoricCaseInstanceQueryRequest start(Integer start) {
    this.start = start;
    return this;
  }

   /**
   * Get start
   * @return start
  **/
  @ApiModelProperty(value = "")
  public Integer getStart() {
    return start;
  }

  public void setStart(Integer start) {
    this.start = start;
  }

  public HistoricCaseInstanceQueryRequest size(Integer size) {
    this.size = size;
    return this;
  }

   /**
   * Get size
   * @return size
  **/
  @ApiModelProperty(value = "")
  public Integer getSize() {
    return size;
  }

  public void setSize(Integer size) {
    this.size = size;
  }

  public HistoricCaseInstanceQueryRequest sort(String sort) {
    this.sort = sort;
    return this;
  }

   /**
   * Get sort
   * @return sort
  **/
  @ApiModelProperty(value = "")
  public String getSort() {
    return sort;
  }

  public void setSort(String sort) {
    this.sort = sort;
  }

  public HistoricCaseInstanceQueryRequest order(String order) {
    this.order = order;
    return this;
  }

   /**
   * Get order
   * @return order
  **/
  @ApiModelProperty(value = "")
  public String getOrder() {
    return order;
  }

  public void setOrder(String order) {
    this.order = order;
  }

  public HistoricCaseInstanceQueryRequest caseInstanceId(String caseInstanceId) {
    this.caseInstanceId = caseInstanceId;
    return this;
  }

   /**
   * Get caseInstanceId
   * @return caseInstanceId
  **/
  @ApiModelProperty(value = "")
  public String getCaseInstanceId() {
    return caseInstanceId;
  }

  public void setCaseInstanceId(String caseInstanceId) {
    this.caseInstanceId = caseInstanceId;
  }

  public HistoricCaseInstanceQueryRequest caseInstanceIds(List<String> caseInstanceIds) {
    this.caseInstanceIds = caseInstanceIds;
    return this;
  }

  public HistoricCaseInstanceQueryRequest addCaseInstanceIdsItem(String caseInstanceIdsItem) {
    if (this.caseInstanceIds == null) {
      this.caseInstanceIds = new ArrayList<String>();
    }
    this.caseInstanceIds.add(caseInstanceIdsItem);
    return this;
  }

   /**
   * Get caseInstanceIds
   * @return caseInstanceIds
  **/
  @ApiModelProperty(value = "")
  public List<String> getCaseInstanceIds() {
    return caseInstanceIds;
  }

  public void setCaseInstanceIds(List<String> caseInstanceIds) {
    this.caseInstanceIds = caseInstanceIds;
  }

  public HistoricCaseInstanceQueryRequest caseBusinessKey(String caseBusinessKey) {
    this.caseBusinessKey = caseBusinessKey;
    return this;
  }

   /**
   * Get caseBusinessKey
   * @return caseBusinessKey
  **/
  @ApiModelProperty(value = "")
  public String getCaseBusinessKey() {
    return caseBusinessKey;
  }

  public void setCaseBusinessKey(String caseBusinessKey) {
    this.caseBusinessKey = caseBusinessKey;
  }

  public HistoricCaseInstanceQueryRequest caseDefinitionId(String caseDefinitionId) {
    this.caseDefinitionId = caseDefinitionId;
    return this;
  }

   /**
   * Get caseDefinitionId
   * @return caseDefinitionId
  **/
  @ApiModelProperty(value = "")
  public String getCaseDefinitionId() {
    return caseDefinitionId;
  }

  public void setCaseDefinitionId(String caseDefinitionId) {
    this.caseDefinitionId = caseDefinitionId;
  }

  public HistoricCaseInstanceQueryRequest caseDefinitionKey(String caseDefinitionKey) {
    this.caseDefinitionKey = caseDefinitionKey;
    return this;
  }

   /**
   * Get caseDefinitionKey
   * @return caseDefinitionKey
  **/
  @ApiModelProperty(value = "")
  public String getCaseDefinitionKey() {
    return caseDefinitionKey;
  }

  public void setCaseDefinitionKey(String caseDefinitionKey) {
    this.caseDefinitionKey = caseDefinitionKey;
  }

  public HistoricCaseInstanceQueryRequest excludeSubprocesses(Boolean excludeSubprocesses) {
    this.excludeSubprocesses = excludeSubprocesses;
    return this;
  }

   /**
   * Get excludeSubprocesses
   * @return excludeSubprocesses
  **/
  @ApiModelProperty(value = "")
  public Boolean getExcludeSubprocesses() {
    return excludeSubprocesses;
  }

  public void setExcludeSubprocesses(Boolean excludeSubprocesses) {
    this.excludeSubprocesses = excludeSubprocesses;
  }

  public HistoricCaseInstanceQueryRequest finished(Boolean finished) {
    this.finished = finished;
    return this;
  }

   /**
   * Get finished
   * @return finished
  **/
  @ApiModelProperty(value = "")
  public Boolean getFinished() {
    return finished;
  }

  public void setFinished(Boolean finished) {
    this.finished = finished;
  }

  public HistoricCaseInstanceQueryRequest involvedUser(String involvedUser) {
    this.involvedUser = involvedUser;
    return this;
  }

   /**
   * Get involvedUser
   * @return involvedUser
  **/
  @ApiModelProperty(value = "")
  public String getInvolvedUser() {
    return involvedUser;
  }

  public void setInvolvedUser(String involvedUser) {
    this.involvedUser = involvedUser;
  }

  public HistoricCaseInstanceQueryRequest finishedAfter(OffsetDateTime finishedAfter) {
    this.finishedAfter = finishedAfter;
    return this;
  }

   /**
   * Get finishedAfter
   * @return finishedAfter
  **/
  @ApiModelProperty(value = "")
  public OffsetDateTime getFinishedAfter() {
    return finishedAfter;
  }

  public void setFinishedAfter(OffsetDateTime finishedAfter) {
    this.finishedAfter = finishedAfter;
  }

  public HistoricCaseInstanceQueryRequest finishedBefore(OffsetDateTime finishedBefore) {
    this.finishedBefore = finishedBefore;
    return this;
  }

   /**
   * Get finishedBefore
   * @return finishedBefore
  **/
  @ApiModelProperty(value = "")
  public OffsetDateTime getFinishedBefore() {
    return finishedBefore;
  }

  public void setFinishedBefore(OffsetDateTime finishedBefore) {
    this.finishedBefore = finishedBefore;
  }

  public HistoricCaseInstanceQueryRequest startedAfter(OffsetDateTime startedAfter) {
    this.startedAfter = startedAfter;
    return this;
  }

   /**
   * Get startedAfter
   * @return startedAfter
  **/
  @ApiModelProperty(value = "")
  public OffsetDateTime getStartedAfter() {
    return startedAfter;
  }

  public void setStartedAfter(OffsetDateTime startedAfter) {
    this.startedAfter = startedAfter;
  }

  public HistoricCaseInstanceQueryRequest startedBefore(OffsetDateTime startedBefore) {
    this.startedBefore = startedBefore;
    return this;
  }

   /**
   * Get startedBefore
   * @return startedBefore
  **/
  @ApiModelProperty(value = "")
  public OffsetDateTime getStartedBefore() {
    return startedBefore;
  }

  public void setStartedBefore(OffsetDateTime startedBefore) {
    this.startedBefore = startedBefore;
  }

  public HistoricCaseInstanceQueryRequest startedBy(String startedBy) {
    this.startedBy = startedBy;
    return this;
  }

   /**
   * Get startedBy
   * @return startedBy
  **/
  @ApiModelProperty(value = "")
  public String getStartedBy() {
    return startedBy;
  }

  public void setStartedBy(String startedBy) {
    this.startedBy = startedBy;
  }

  public HistoricCaseInstanceQueryRequest includeCaseVariables(Boolean includeCaseVariables) {
    this.includeCaseVariables = includeCaseVariables;
    return this;
  }

   /**
   * Get includeCaseVariables
   * @return includeCaseVariables
  **/
  @ApiModelProperty(value = "")
  public Boolean getIncludeCaseVariables() {
    return includeCaseVariables;
  }

  public void setIncludeCaseVariables(Boolean includeCaseVariables) {
    this.includeCaseVariables = includeCaseVariables;
  }

  public HistoricCaseInstanceQueryRequest variables(List<QueryVariable> variables) {
    this.variables = variables;
    return this;
  }

  public HistoricCaseInstanceQueryRequest addVariablesItem(QueryVariable variablesItem) {
    if (this.variables == null) {
      this.variables = new ArrayList<QueryVariable>();
    }
    this.variables.add(variablesItem);
    return this;
  }

   /**
   * Get variables
   * @return variables
  **/
  @ApiModelProperty(value = "")
  public List<QueryVariable> getVariables() {
    return variables;
  }

  public void setVariables(List<QueryVariable> variables) {
    this.variables = variables;
  }

  public HistoricCaseInstanceQueryRequest tenantId(String tenantId) {
    this.tenantId = tenantId;
    return this;
  }

   /**
   * Get tenantId
   * @return tenantId
  **/
  @ApiModelProperty(value = "")
  public String getTenantId() {
    return tenantId;
  }

  public void setTenantId(String tenantId) {
    this.tenantId = tenantId;
  }

  public HistoricCaseInstanceQueryRequest withoutTenantId(Boolean withoutTenantId) {
    this.withoutTenantId = withoutTenantId;
    return this;
  }

   /**
   * Get withoutTenantId
   * @return withoutTenantId
  **/
  @ApiModelProperty(value = "")
  public Boolean getWithoutTenantId() {
    return withoutTenantId;
  }

  public void setWithoutTenantId(Boolean withoutTenantId) {
    this.withoutTenantId = withoutTenantId;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    HistoricCaseInstanceQueryRequest historicCaseInstanceQueryRequest = (HistoricCaseInstanceQueryRequest) o;
    return Objects.equals(this.start, historicCaseInstanceQueryRequest.start) &&
        Objects.equals(this.size, historicCaseInstanceQueryRequest.size) &&
        Objects.equals(this.sort, historicCaseInstanceQueryRequest.sort) &&
        Objects.equals(this.order, historicCaseInstanceQueryRequest.order) &&
        Objects.equals(this.caseInstanceId, historicCaseInstanceQueryRequest.caseInstanceId) &&
        Objects.equals(this.caseInstanceIds, historicCaseInstanceQueryRequest.caseInstanceIds) &&
        Objects.equals(this.caseBusinessKey, historicCaseInstanceQueryRequest.caseBusinessKey) &&
        Objects.equals(this.caseDefinitionId, historicCaseInstanceQueryRequest.caseDefinitionId) &&
        Objects.equals(this.caseDefinitionKey, historicCaseInstanceQueryRequest.caseDefinitionKey) &&
        Objects.equals(this.excludeSubprocesses, historicCaseInstanceQueryRequest.excludeSubprocesses) &&
        Objects.equals(this.finished, historicCaseInstanceQueryRequest.finished) &&
        Objects.equals(this.involvedUser, historicCaseInstanceQueryRequest.involvedUser) &&
        Objects.equals(this.finishedAfter, historicCaseInstanceQueryRequest.finishedAfter) &&
        Objects.equals(this.finishedBefore, historicCaseInstanceQueryRequest.finishedBefore) &&
        Objects.equals(this.startedAfter, historicCaseInstanceQueryRequest.startedAfter) &&
        Objects.equals(this.startedBefore, historicCaseInstanceQueryRequest.startedBefore) &&
        Objects.equals(this.startedBy, historicCaseInstanceQueryRequest.startedBy) &&
        Objects.equals(this.includeCaseVariables, historicCaseInstanceQueryRequest.includeCaseVariables) &&
        Objects.equals(this.variables, historicCaseInstanceQueryRequest.variables) &&
        Objects.equals(this.tenantId, historicCaseInstanceQueryRequest.tenantId) &&
        Objects.equals(this.withoutTenantId, historicCaseInstanceQueryRequest.withoutTenantId);
  }

  @Override
  public int hashCode() {
    return Objects.hash(start, size, sort, order, caseInstanceId, caseInstanceIds, caseBusinessKey, caseDefinitionId, caseDefinitionKey, excludeSubprocesses, finished, involvedUser, finishedAfter, finishedBefore, startedAfter, startedBefore, startedBy, includeCaseVariables, variables, tenantId, withoutTenantId);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class HistoricCaseInstanceQueryRequest {\n");

    sb.append("    start: ").append(toIndentedString(start)).append("\n");
    sb.append("    size: ").append(toIndentedString(size)).append("\n");
    sb.append("    sort: ").append(toIndentedString(sort)).append("\n");
    sb.append("    order: ").append(toIndentedString(order)).append("\n");
    sb.append("    caseInstanceId: ").append(toIndentedString(caseInstanceId)).append("\n");
    sb.append("    caseInstanceIds: ").append(toIndentedString(caseInstanceIds)).append("\n");
    sb.append("    caseBusinessKey: ").append(toIndentedString(caseBusinessKey)).append("\n");
    sb.append("    caseDefinitionId: ").append(toIndentedString(caseDefinitionId)).append("\n");
    sb.append("    caseDefinitionKey: ").append(toIndentedString(caseDefinitionKey)).append("\n");
    sb.append("    excludeSubprocesses: ").append(toIndentedString(excludeSubprocesses)).append("\n");
    sb.append("    finished: ").append(toIndentedString(finished)).append("\n");
    sb.append("    involvedUser: ").append(toIndentedString(involvedUser)).append("\n");
    sb.append("    finishedAfter: ").append(toIndentedString(finishedAfter)).append("\n");
    sb.append("    finishedBefore: ").append(toIndentedString(finishedBefore)).append("\n");
    sb.append("    startedAfter: ").append(toIndentedString(startedAfter)).append("\n");
    sb.append("    startedBefore: ").append(toIndentedString(startedBefore)).append("\n");
    sb.append("    startedBy: ").append(toIndentedString(startedBy)).append("\n");
    sb.append("    includeCaseVariables: ").append(toIndentedString(includeCaseVariables)).append("\n");
    sb.append("    variables: ").append(toIndentedString(variables)).append("\n");
    sb.append("    tenantId: ").append(toIndentedString(tenantId)).append("\n");
    sb.append("    withoutTenantId: ").append(toIndentedString(withoutTenantId)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}
